<template>
  <div>
    <div  class="header">
      <h1><a href="">{{ msg }}</a></h1>
      <img src="../assets/logo.png" alt="" id="logopic">
      <user-message></user-message>
    </div>
  </div>

</template>

<script>
  import UserMessage from '../components/UserMessage'

  export default {
    name: 'Header',
    data() {
      return {
        msg:"网易云音乐",
        isLogin: true,
        username: '',
      }
    },
    components: {
    UserMessage
  },
    created() {
      //    此时登录成功
      let token = localStorage.getItem('token')
      //    console.log(token)
      if (token) {
        this.isLogin = true
        this.username = localStorage.getItem('username')
        this.id = localStorage.getItem('_id')
      } else {
        console.log('用户获得登录失败');
        //      this.localStorage.setItem(data.body.data);
      }
    },
    methods: {
      toShow() {

      }
    },
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  h1,
  a {
    position: absolute;
    top: 0%;
    left: 44%;
    letter-spacing: 5px;
    font-size: 30px;
    width: 180px;
    color: rgb(255, 255, 255, 0.6);
    text-decoration: none;
  }

  h3 {
    position: absolute;
    right: 175px;
    top: 35px;
    color: rgb(255, 255, 255, 0.6);
  }

  .header {
    position: absolute;
    width: 100%;
    height: 100px;
    top: 10px;
    right: 100px;
  }
  row{
    position: absolute;
    right: 250px;
    top: 25px;
  }


  #logopic {
    width: 40px;
    height: 40px;
    /* border-radius: 50%; */
    position: absolute;
    right: 175px;
    top: 60px;
  }

  ::-webkit-scrollbar {
    width: 0px;
  }

  ::-webkit-scrollbar-track {
    width: 0px;
  }

  ::-webkit-scrollbar-thumb {
    border-radius: 5px;
    background-color: transparent;
  }
</style>